<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<script>
    let arr = [1, 2, 3, 4, 5];
    console.log(arr.length);
    console.log(arr[0], arr[1], arr[2], arr[3], arr[4], arr[5]);
    let [a, b, c, d = 100] = [1, 2, 3, 4]
    console.log(a, b, c, d);
    let student = {id: 1, name: 'zhangsan', age: 18, sex: '男'};
    console.log(student.id, student.name, student.age, student.sex);
/*    let {id, name, age, sex} = {id: 2, name: 'lisi', age: 19, sex: '女'};
    console.log(id, name, age, sex);*/
    let {id , name , age , gender} = {id: 3, name: 'wangwu', age: 20 , gender: '女'};
    console.log(id , name , age , gender);
    let {id: studentId , name: studentName} = {id: 4, name: 'zhaoliu'};
    console.log(studentId , studentName);
</script>

</body>
</html>